<template>
  <div class="docker">
    <div
      v-for="(item, index) in dockerList"
      :key="item.icon"
      :class="{ docker__item: true, 'docker__item--active': index === 0 }"
    >
      <router-link :to="item.to">
        <div class="iconfont" v-html="item.icon"></div>
        <div class="docker__title">{{ item.title }}</div>
      </router-link>
    </div>
    <!-- <a href="http://localhost:9898/">houtai</a> -->
  </div>
</template>

<script>
export default {
  name: "Docker.vue",
  setup() {
    const dockerList = [
      { icon: "&#xe6bb;", title: "首页", to: { name: "Home" } },
      { icon: "&#xe7f5;", title: "购物车", to: { name: "CartList" } },
      { icon: "&#xe62a;", title: "订单", to: { name: "OrderList" } },
      { icon: "&#xe78b;", title: "我的", to: { name: "PersonalInfo" } },
    ];

    return { dockerList };
  },
};
</script>

<style lang="scss" scoped>
@import "../style/viriables.scss";
@import "../style/mixins.scss";
.docker {
  display: flex;
  box-sizing: border-box;
  padding: 0 0.18rem;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0.49rem;
  color: $content-fontcolor;
  border-top: 0.01rem solid $content-bgColor;
  &__item {
    flex: 1;
    text-align: center;
    a {
      text-decoration: none;
    }
    .iconfont {
      margin: 0.07rem 0 0.02rem 0;
      font-size: 0.18rem;
    }
    &--active {
      a {
        color: #1fa4fc;
      }
    }
  }
  &__title {
    font-size: 20px;
    transform: scale(0.5, 0.5);
    transform-origin: center top;
  }
}
</style>